The Customization ('cust') Resource
The driver customization ('cust'
) resource, of typegxCustType
, tells QuickDraw GX how to support the use of your printer driver by Macintosh Printing Manager applications. It defines values that help QuickDraw GX to translate Macintosh Printing Manager calls into messages for your printer driver. If you do not include a customization resource for your driver, a default version is used by QuickDraw GX. The default version works well for most drivers. Figure 6-16 shows the structure of a customization resource.Figure 6-16 The customization resource
The customization resource defines the following:
Table 6-20 shows the constants that you can use to specify the updriver type in customization resources.
- Horizontal resolution. The horizontal resolution to use for the device in dots per inch (dpi).
- Vertical resolution. The vertical resolution to use for the device in dots per inch.
- Macintosh Printing Manager interface type. The style of Macintosh Printing Manager interface driver with which your driver is compatible. Constants for this field are shown in Table 6-20.
- Pattern stretch factor. A point that indicates how to scale bitmap patterns when printing.
- Translator settings. Settings for translating Macintosh Printing Manager driver calls into messages for your driver. Constants for the translator setting values, which you can combine together into a single value, are shown in Table 6-21.
Table 6-20 Updriver values for the customization resource Constant Value Explanation defaultUpDriver
0 LaserWriter interface laserWriter
0 LaserWriter interface laserWriterSC
1 LaserWriter SC interface Table 6-21 shows the constants that you can use to specify translator settings in customization resources.
The customization resource ID needs to be the constant
gxCustID
(-8192). Listing 6-14 shows an example of a customization resource for the ImageWriter II printer driver, which uses the optimized translation settings and scales bitmaps by a factor of 2 both horizontally and vertically.Listing 6-14 An example of a customization resource
resource gxCustType (gxCustID, sysHeap, purgeable) { 144, 144, /* 144 dpi device */ defaultUpDriver, /* use default upDriver */ {2,2}, /* pattern scaling (144dpi/72dpi)*/ gxOptimizedTranslation/* use optimized translator settings */ };
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help